<%@ include file="/WEB-INF/views/common/includes.jsp"%>
<%@taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<body>
	<header class="header bg-success navbar navbar-inverse">
		<div class="collapse navbar-collapse pull-in">
			<ul class="nav navbar-nav m-l-n m-r-lgx1">
				<li class="nav-brand" ><a href="/"><img style="max-height:40px; margin-bottom:-13px"
						src="../theme/images/nutty.png" alt="Nutty"></a></li>
			</ul>

			<form action="search" method="GET"
				class="navbar-form navbar-left m-t-sm" role="search">
				<div class="form-group">
					<div class="input-group input-s">
						<div class="input-group input-s-lg1">
							<input type="text"
								class="form-control input-sm no-border bg-light"
								placeholder="Search" name="q"> <span
								class="input-group-btn">
								<button type="submit" class="btn btn-sm btn-primary btn-icon">
									<i class="icon-search"></i>
								</button>
							</span>
						</div>
					</div>
				</div>
			</form>
			<ul class="nav navbar-nav navbar-right">
				<c:if test="${not empty user}">
					<li class="hidden-xs"><a href="#" class="dropdown-toggle"
						data-toggle="dropdown"> <i class="icon-bell-alt text-white"></i>
							<span class="badge up bg-info m-l-n-sm">2</span>
					</a>
						<section class="dropdown-menu animated fadeInUp input-s-lg">
							<section class="panel bg-white">
								<div class="panel-heading">
									<strong>You have a lot of<span class="count-n">2</span>
										notifications
									</strong>
								</div>
								<div class="list-group">
									<a href="#" class="media list-group-item"> <span
										class="pull-left thumb-sm"> <img
											src="../theme/images/avatar_default.jpg" alt="John said"
											class="img-circle">
									</span> <span class="media-body block m-b-none"> Use awesome
											animate.css<br> <small class="text-muted">28 Aug
												13</small>
									</span>
									</a> <a href="#" class="media list-group-item"> <span
										class="media-body block m-b-none"> 1.0 initial released<br>
											<small class="text-muted">27 Aug 13</small>
									</span>
									</a>
								</div>
							</section>
						</section></li>
					<li class="dropdown"><a href="#" class="dropdown-toggle"
						data-toggle="dropdown"> <span
							class="thumb-sm avatar pull-left m-t-n-xs m-r-xs"><img
								src="../profile/picture/${user.id}"> </span> ${user.username} <b
							class="caret"></b>
					</a>
						<ul class="dropdown-menu animated fadeInUp">
							<li><a href="/editProfile">Edit Profile</a></li>
							<li><a href="/profile">Profile</a></li>
							<li><a href="#"> <span
									class="badge bg-danger pull-right">3</span> Notifications
							</a></li>
							<li><a href="#modal_form" data-toggle="modal">Settings</a></li>
							<li><a href="logout">Logout</a></li>
						</ul></li>

				</c:if>
				<c:if test="${empty user}">
					<c:if test="${not empty param.error}">
					</c:if>
					<c:if test="${empty param.error}">
						<form class="form-inline" style="padding: 7px"
							action="j_spring_security_check" method="POST" role="form">
							<div class="form-group">
								<label class="sr-only">Username</label> <input type="text"
									class="form-control input-sm no-border bg-light"
									name="j_username" placeholder="Username">
							</div>
							<div class="form-group">
								<label class="sr-only">Password</label> <input type="password"
									class="form-control input-sm no-border bg-light"
									name="j_password" placeholder="Password">
							</div>
							<button type="submit" class="btn btn-sm btn-primary">Login</button>
						</form>
					</c:if>
				</c:if>

			</ul>
		</div>


	</header>
	<div class="modal fade" id="modal_form" aria-hidden="true"
		style="display: none;">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h3 class="m-t-none m-b">Account Settings</h3>
				</div>
				<div class="modal-body">
					<div class="row">
						<div class="col-sm-12 b-r">
							<form role="form" action="userSettings" method="POST">
								<div class="form-group col-lg-6" style="margin-bottom: 50px;">
									<label>Password</label> <input type="password"
										class="form-control" name="pass">
								</div>
								<div class="form-group col-lg-6" style="margin-bottom: 50px;">
									<label>Confirm Password</label> <input type="password"
										class="form-control" name="again">
								</div>

								<div class="form-group col-lg-6" style="margin-bottom: 50px;margin-top:75px; float:right">
									<div class="checkbox m-t-lg">
										<button type="submit"
											class="btn btn-sm btn-primary pull-right text-uc m-t-n-xs">
											<strong>Save Changes</strong>
										</button>
									</div>
								</div>
							</form>
							<form action="deactivate">
								<div class="form-group col-lg-6"
									style="margin-bottom: 50px; float:left; margin-top:14px">
									<button type="submit"
										class="form-control  btn  btn-sm btn-danger"
										value="Deactivate Account">
										<strong>Deactivate Account</strong>
									</button>
								</div>
							</form>
						</div>

					</div>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
</body>
